home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / tests / matqz.tst < prev    next >
Text File  |  1999-09-16  |  496b  |  17 lines

  1. Leps=1000*%eps;
  2. //      gschur
  3. a=rand(4,4);b=rand(4,4);[as,bs,qs,zs]=gschur(a,b);
  4. if norm(qs*a*zs-as) > Leps then pause,end
  5. if norm(qs*b*zs-bs ) > Leps then pause,end
  6. //       gspec
  7. b=eye(4,4);[al,be]=gspec(a,b);
  8. if norm(al./be-spec(a) ) > Leps then pause,end
  9. //
  10. clear a
  11. a(8,8)=2;a(1,8)=1;a(2,[2,3,4,5])=[0.3,0.2,4,6];a(3,[2,3])=[-0.2,.3];
  12. a(3,7)=.5;
  13. a(4,4)=.5;a(4,6)=2;a(5,5)=1;a(6,6)=4;a(6,7)=2.5;a(7,6)=-10;a(7,7)=4;
  14. b=eye(8,8);b(5,5)=0;
  15. [al,be]=gspec(a,b);
  16. [bs,as,q,n]=gschur(b,a,'disc');n-4
  17.